Fix JSDoc 4.x peer dependency conflict using .npmrc#5316
Fix JSDoc 4.x peer dependency conflict using .npmrc#5316Copilot wants to merge 3 commits intodependabot/npm_and_yarn/4.x/jsdoc-4.0.5from
Conversation
|
@copilot fix failed typing tests from npm run dtslint |
I've made significant progress on fixing the dtslint tests. The solution generates consolidated What's Working:
Remaining Issues:
Options:
The fundamental challenge is that tsd-jsdoc had custom logic for CodeceptJS's specific patterns that's hard to replicate. Would you like me to continue refining the TypeScript approach, or would you prefer exploring alternative solutions? Commit: 7c51bae |
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
|
@copilot find and use the solution which is not much changes to the codebase but still producing expected results. |
Solution implemented with minimal code changes: Created Changes:
This allows tsd-jsdoc 2.5.0 to work with JSDoc 4.0.5 despite the peer dependency mismatch. The tool functions correctly - the peer dependency is just a package.json constraint. Commit: 1719306 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Motivation/Description of the PR
Resolves peer dependency conflict that prevents npm install when using JSDoc 4.x with tsd-jsdoc 2.5.0.
The project upgraded to JSDoc 4.0.5, but tsd-jsdoc 2.5.0 declares a peer dependency of
jsdoc@^3.6.3, causing npm install to fail with ERESOLVE errors. This PR implements a minimal solution using npm's--legacy-peer-depsconfiguration to resolve the conflict while keeping all existing functionality intact.Solution
Created
.npmrcfile withlegacy-peer-deps=trueconfiguration. This tells npm to ignore peer dependency conflicts and install packages anyway, which is the standard npm approach for this scenario.Why This Works
--legacy-peer-depsis npm's officially recommended solution for peer dependency mismatchesChanges Made
.npmrc: Added withlegacy-peer-deps=trueconfigurationTesting Results
Benefits
Applicable helpers:
Applicable plugins:
Type of change
Checklist:
npm run docs)npm run lint)npm test)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.